function ProbF  =  distanceProbModel(dist, sigma, way, roi)
    if nargin < 4
       roi = logical(ones(size(dist)));
    end
        
        
    ProbF       =       zeros(size(dist));
    if way ==1
        ProbF(roi)  =       -atan(dist(roi)/sigma)/pi + 0.5;
    elseif way ==2
        ProbF(roi)  =        1./(1+exp(dist(roi)/sigma));
    end
    
end